Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented Feb 11, 2025

Backport 84fe1f6

Requested by: @lhames

The find-dynamic-unwind-info callback registration APIs in libunwind
limit the number of callbacks that can be registered. If we use multiple
UnwindInfoManager instances, each with their own own callback function
(as was the case prior to this patch) we can quickly exceed this limit
(see llvm#126611).

This patch updates the UnwindInfoManager class to use a singleton
pattern, with the single instance shared between all LLVM JITs in the
process.

This change does _not_ apply to compact unwind info registered through
the ORC runtime (which currently installs its own callbacks).

As a bonus this change eliminates the need to load an IR "bouncer"
module to supply the unique callback for each instance, so support for
compact-unwind can be extended to the llvm-jitlink tools (which does not
support adding IR).

(cherry picked from commit 84fe1f6)
@tstellar
Copy link
Collaborator

@lhames did you decide not to backport this one?

@lhames
Copy link
Contributor

lhames commented Feb 16, 2025

@tstellar Apologies -- this was superseded by #126831. I thought that that one had been merged already, but it has not been. Are you able to take a look?

@lhames lhames added the duplicate Resolved as duplicate label Feb 16, 2025
@tstellar
Copy link
Collaborator

@tstellar Apologies -- this was superseded by #126831. I thought that that one had been merged already, but it has not been. Are you able to take a look?

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate Resolved as duplicate

Projects

Development

Successfully merging this pull request may close these issues.

3 participants